Skip to content

Conversation

@ebatsell
Copy link
Collaborator

@ebatsell ebatsell commented Dec 4, 2025

Adds commitment to CLIs and improves the "active set" logic to do what we really want: only cranking stake pool vote accounts

@ebatsell ebatsell marked this pull request as ready for review December 4, 2025 21:31
Comment on lines +79 to +82
/// Commitment level for RPC queries
#[arg(long, global = true, env, default_value = "confirmed")]
pub commitment: CommitmentLevel,

Copy link
Collaborator

@aoikurokawa aoikurokawa Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can use CommitmentLevel from solana-sdk instead, what do you think?

use solana_sdk::commitment_config::CommitmentLevel;

impl From<CommitmentLevel> for CommitmentConfig {
    fn from(level: CommitmentLevel) -> Self {
        match level {
            CommitmentLevel::Processed => CommitmentConfig::processed(),
            CommitmentLevel::Confirmed => CommitmentConfig::confirmed(),
            CommitmentLevel::Finalized => CommitmentConfig::finalized(),
        }
    }
}

#[arg(long, global = true, env, default_value = "confirmed", value_parser = clap::value_parser!(CommitmentLevel))]
pub commitment: CommitmentLevel,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants